package com.mjh.util;

import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;

public class FileUtil {

	public static Reader getResourceAsReader(String resource) {
		return new InputStreamReader(getResourceAsStream(resource));
	}

	public static InputStream getResourceAsStream(String resource) {
		InputStream in = null;
		in = Thread.currentThread().getContextClassLoader().getResourceAsStream(resource);
		if (in == null)
			in = ClassLoader.getSystemResourceAsStream(resource);
		return in;
	}
}
